<?php
include_once('../includes/definer.php');
include_once(INC.'admin/php/bootstrap.php');
$results = array();
$home = Home::getInstance();
foreach ($home->imagenes as $imagen) {
    $n = array();
    $n['id'] = $imagen->id;
    $n['imagenId'] = $imagen->id;
    $n['caption'] = '';
    $n['imagenNombre'] = $imagen->src;
    $n['imagenCaption'] = ($imagen->caption)?utf8_encode($imagen->caption):'';
    $n['edit'] = 1;
    $n['url'] = URL.'content/home/';
    $n['alea'] = time();
    $results[] = $n;
}
$results = json_encode($results);
header("Content-type: application/json");
echo($results);
?>